﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace THenu.TinyHourseLib.DesignPattern.Specification_Pattern
{
    public class NotSpecification<T> : CompositeSpecification<T>
    {
        /// <summary>
        /// 运算参数
        /// </summary>
        ISpecification<T> leftSpecification;

        public NotSpecification(ISpecification<T> objSpec)
        {
            leftSpecification = objSpec;
        }


        public override bool IsSatisfiedBy(T obj)
        {
            return leftSpecification.IsSatisfiedBy(obj);
        }
    }
}

